package com.alangyun.remind.vo.talent;

import com.alangyun.remind.repository.data.TalentCaution;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 趋势视图<br/>
 *
 * @company 北京诚朗信息技术有限公司
 * @author hoobort klxukun@126.com
 * @datetime 2022年12月14日 下午9:39:09
 *
 */
public class TrendView implements Serializable {

	private List<TrendUser> users;
	private List<TrendSum> sums;
	private List<TrendItem> yearPersonList = new ArrayList<>();


	public static TrendView create() {
		TrendView ret = new TrendView();

		ret.users = new ArrayList<TrendUser>();
		ret.sums = new ArrayList<TrendSum>();

		return ret;
	}

	public List<TrendUser> getUsers() {
		return users;
	}

	public void setUsers(List<TrendUser> users) {
		this.users = users;
	}


	public List<TrendSum> getSums() {
		return sums;
	}

	public void setSums(List<TrendSum> sums) {
		this.sums = sums;
	}

	public List<TrendItem> getYearPersonList() {
		return yearPersonList;
	}

	public void setYearPersonList(List<TrendItem> yearPersonList) {
		this.yearPersonList = yearPersonList;
	}


	public static class TrendUser implements  Serializable {
		private String id;
		private String name;
		private String unit;
		private String depart;
		private String career;
		private String job;
		private String longCareer;
		private Integer year=0;
		private String czsjzzy;
		private String czsjzw;
		private String scgwg3n;
		private String yxgwg3n;
		private String ryzhly;
		private String ryzyly;
		private String ryjtlry;
		private String ryzgry;
		private String rctchxtn;
		private String rctchxtw;

		public String getId() {
			return id;
		}

		public void setId(String id) {
			this.id = id;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getUnit() {
			return unit;
		}

		public void setUnit(String unit) {
			this.unit = unit;
		}

		public String getDepart() {
			return depart;
		}

		public void setDepart(String depart) {
			this.depart = depart;
		}

		public String getCareer() {
			return career;
		}

		public void setCareer(String career) {
			this.career = career;
		}

		public String getJob() {
			return job;
		}

		public void setJob(String job) {
			this.job = job;
		}

		public String getLongCareer() {
			return longCareer;
		}

		public void setLongCareer(String longCareer) {
			this.longCareer = longCareer;
		}

		public Integer getYear() {
			return year;
		}

		public void setYear(Integer year) {
			this.year = year;
		}

        public String getCzsjzzy() {
            return czsjzzy;
        }

        public void setCzsjzzy(String czsjzzy) {
            this.czsjzzy = czsjzzy;
        }

        public String getCzsjzw() {
            return czsjzw;
        }

        public void setCzsjzw(String czsjzw) {
            this.czsjzw = czsjzw;
        }

        public String getScgwg3n() {
            return scgwg3n;
        }

        public void setScgwg3n(String scgwg3n) {
            this.scgwg3n = scgwg3n;
        }

        public String getYxgwg3n() {
            return yxgwg3n;
        }

        public void setYxgwg3n(String yxgwg3n) {
            this.yxgwg3n = yxgwg3n;
        }

        public String getRyzhly() {
            return ryzhly;
        }

        public void setRyzhly(String ryzhly) {
            this.ryzhly = ryzhly;
        }

        public String getRyzyly() {
            return ryzyly;
        }

        public void setRyzyly(String ryzyly) {
            this.ryzyly = ryzyly;
        }

        public String getRyjtlry() {
            return ryjtlry;
        }

        public void setRyjtlry(String ryjtlry) {
            this.ryjtlry = ryjtlry;
        }

        public String getRyzgry() {
            return ryzgry;
        }

        public void setRyzgry(String ryzgry) {
            this.ryzgry = ryzgry;
        }

        public String getRctchxtn() {
            return rctchxtn;
        }

        public void setRctchxtn(String rctchxtn) {
            this.rctchxtn = rctchxtn;
        }

        public String getRctchxtw() {
            return rctchxtw;
        }

        public void setRctchxtw(String rctchxtw) {
            this.rctchxtw = rctchxtw;
        }
    }
	public static class TrendSum  implements Serializable, Comparable<TrendSum> {
		private Integer index;
		private String name;
		private List<TrendItem> items;
		
		public static TrendSum create(int index, String name) {
			TrendSum ret= new TrendSum();
			ret.index = index;
			ret.name = name;
			
			return ret;
		}
		public Integer getIndex() {
			return index;
		}

		public void setIndex(Integer index) {
			this.index = index;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public List<TrendItem> getItems() {
			return items;
		}

		public void setItems(List<TrendItem> items) {
			this.items = items;
		}

		@Override
		public int compareTo(TrendSum o) {
			return index > o.index ? 1: 0;
		}
		
	}

	public static class TrendItem implements Serializable, Comparable<TrendItem> {

		private Integer year=0; // 年度
		private Integer count=0; // 实际人数
		private Integer trendCount=0; // 具备人数
		private List<TalentCaution> cautions = new ArrayList<>();

		public Integer getYear() {
			return year;
		}

		public void setYear(Integer year) {
			this.year = year;
		}

		public Integer getCount() {
			return count;
		}

		public void setCount(Integer count) {
			this.count = count;
		}

		public Integer getTrendCount() {
			return trendCount;
		}

		public void setTrendCount(Integer trendCount) {
			this.trendCount = trendCount;
		}

		public void incCount() {
			this.count += 1;
		}

		public void incTrendCount() {
			this.trendCount += 1;
		}

		@Override
		public int compareTo(TrendItem o) {
			return year >o.getYear() ?1: 0;
		}

		public void addUser(TalentCaution caution) {
			this.cautions.add(caution);
		}

        public void setCautions(List<TalentCaution> cautions) {
            this.cautions = cautions;
        }

		public List<TalentCaution> getCautions() {
			return cautions;
		}
    }

}
